package com.sxkj.cyezj.service.impl;

import java.util.List;

import com.sxkj.cyezj.dao.NewsDao;
import com.sxkj.cyezj.pojo.News;
import com.sxkj.cyezj.service.NewsService;

public class NewsServiceImpl implements NewsService {

	private NewsDao newsDao;
	
	@Override
	public void insertNews(News news) {
		newsDao.insertNews(news);
	}

	@Override
	public void deleteNewsById(String nId) {
		newsDao.deleteNewsById(nId);
	}

	@Override
	public void updateNews(News news) {
		newsDao.updateNews(news);
	}

	@Override
	public void updateNewsDate(News news) {
		newsDao.updateNewsDate(news);
	}

	@Override
	public void updateNewsValid(News news) {
		newsDao.updateNewsValid(news);
	}

	@Override
	public void updateNewsListValid(List<News> list) {
		newsDao.updateNewsListValid(list);
	}

	@Override
	public void updateNewsListInValid(List<News> list) {
		newsDao.updateNewsListInValid(list);
	}

	@Override
	public News getNews(String nId) {
		return newsDao.getNews(nId);
	}

	@Override
	public List<News> getNewsByModuleId(String mId) {
		return newsDao.getNewsByModuleId(mId);
	}

	public void setNewsDao(NewsDao newsDao) {
		this.newsDao = newsDao;
	}

	public NewsDao getNewsDao() {
		return newsDao;
	}

}
